package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by chengang on 2017/6/8.
 */

public class CardDetailApi extends BaseApi{

    PerformanceReq req;
    public CardDetailApi(String link_mobile,String sx_id,String person_name,String days) {
        req = new PerformanceReq(link_mobile,sx_id,person_name,days);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).personBxList(requestBody);
    }

    class PerformanceReq {
        private String link_mobile;
        private String sx_id;
        private String person_name;
        private String days;
        public PerformanceReq(String link_mobile,String sx_id,String person_name,String days){
            this.link_mobile = link_mobile;
            this.sx_id = sx_id;
            this.person_name = person_name;
            this.days = days;
        }
    }
}
